//
//  common.swift
//  MDIWeibo
//
//  Created by 迁徙鸟 on 16/4/16.
//  Copyright © 2016年 qianxiniao. All rights reserved.
//

import UIKit

//新浪微博需要的数据
let APPKEY = "4293200273"
let APPSECRET = "47ea68fe34c0ee2847f495a791d9a174"
//回调页
let REDIRECT_URI = "http://www.baidu.com/"


let MDIWeiboName = "muqi70595723@163.com"
let MDIWeiboPasswd = "aaa333"

// RGB颜色
func RGB(red red: CGFloat, green: CGFloat, blue: CGFloat) -> UIColor{
    
    return UIColor(red: red / 255, green: green / 255, blue: blue / 255, alpha: 1)
}

//屏幕宽高
let KWIDTH = UIScreen.mainScreen().bounds.width

let KHEIGHT = UIScreen.mainScreen().bounds.height

//主题颜色
let subjectColor = UIColor.orangeColor()


func randomColor()->UIColor{

//        随机颜色(random()有一个BUG，就是每次程序启动时，产生的随机数都相同)
    
    let R = random()%256
    let G = random()%256
    let B = random()%256
    

    return RGB(red: CGFloat(R), green: CGFloat (G), blue: CGFloat (B))

}